<%= render 'public/flash_notice' %>
<div class="row">
  <ol class="breadcrumb">
    <li>产品管理</li>
  </ol>


  <table id="posts" class="table table-striped">
    <thead>
      <tr>
        <th>商品标题</th>
        <th>语言</th>
        <th>创建时间</th>
        <th>修改时间</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody>
    <% @products.each do |product| %>
      <tr>
      <td><%= link_to product.title,product_path(product),target: '_blank' %></td>
      <td><%= language_for(product.language) %></td>
      <td><%= format_datetime(product.created_at, '%Y-%m-%d %H:%M') %></td>
      <td><%= format_datetime(product.updated_at, '%Y-%m-%d %H:%M') %></td>
      <td class="opts">
        <%= link_to '', [:cpanel, product],class:'icon-eye-open'  %>
        <%= link_to '', edit_cpanel_product_path(product) ,class:'icon-edit'%>
        <%= link_to '', [:cpanel, product], method: :delete, data: { confirm: '确认删除' }, class: 'icon-trash' %>
      </td>
    </tr>
  <% end %>
    </tbody>
  </table>
  <div class="paginate-right-position">
    <%= will_paginate @products %>
  </div>
</div>
